<?php

namespace app\controller\v1\admin;

use app\BaseController;
use app\common\Send;
use app\service\UserMoneyService;
use app\utils\UserMoneyEmun;
use think\App;
use think\Request;

class UserMoney extends BaseController
{
    use Send;
    protected $userMoneyService;

    public function __construct(App $app,UserMoneyService $userMoneyService){
        parent::__construct($app);
        $this->userMoneyService = $userMoneyService;
    }

    public function index(Request $request)
    {
        $params = $request->param();
        $result = $this->userMoneyService->list($params);
        return self::success($result);
    }

    public function type()
    {
        return self::success(UserMoneyEmun::userMoneyTypeText());
    }
}
